<?php
namespace app\index\controller;

class Call extends BaseHome
{
    public function index()
    {
        $lbp=db("lb")->where("fid=21")->find();
        $this->assign("lbp",$lbp);
        
        $lbm=db("lb")->where("fid=22")->find();
        $this->assign("lbm",$lbm);
        
        $res=db("cases_type")->select();
        $this->assign("res",$res);
        return \view('index');
    }
    public function save()
    {
        if($this->request->isAjax()){
            $data=\input('post.');
            $data['time']=\time();
            $re=db("message")->insert($data);
            if($re){
                $this->success("提交成功，我们会在1个工作日与您联系");
            }else{
                $this->error("系统繁忙，请稍后再试",url('index'));
            }
        }else{
            $this->error("非法操作",url('index'));
        }
    }
}